package com.rran.study.chat.user.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author yy
 * @Type LoginDTO.java
 * @Desc
 * @date 2020/8/11 10:07
 */
@Data
@ApiModel(description = "用户登录请求参数")
public class LoginWithPwdDTO {

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号码格式有误")
    @ApiModelProperty(value = "账号（手机号）, 规则：第一位必为1，第二位不能为0/1/2,总共11位数字", required = true, example = "13838382438")
    private String account;

    @NotBlank(message = "登录密码不能为空")
    @ApiModelProperty(value = "密码, 明文传输，规则：密码长度8到30位；必须含有数字，大写字母，小写字母", required = true, example = "123456Sb")
    private String password;

}
